/*
能操作banner集合数据的Model
 */
// 1.引入mongoose
const mongoose = require('mongoose')

// 2.字义Schema(描述文档结构)
const bannerSchema = new mongoose.Schema({
    imgs: {type: Array, default: []},
    link: {type: String, required: true}// 名称
})

// 3. 定义Model(与集合对应, 可以操作集合)
const BannerModel = mongoose.model('banners', bannerSchema)

// 4. 向外暴露Model
module.exports = BannerModel
